package Task27;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            System.out.println(Add(n,m));
        }
    }
    public static int Add(int num1,int num2) {
        int num3 = 0;
        do{
            num3 = num1^num2;
            num2 = (num1&num2)<< 1;
            num1 = num3;
        }while (num2!=0);
        return num3;
    }
}
